home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
COMM
/
BINKLA20.ARJ
/
BKLARPTS.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-02-19
|
2KB
|
75 lines
DEFINT A-Z
' Program Name: BKLARPTS.EXE
' Author: R.J.(Bob) Ross FidoNet 1:134/75
' Date Started: January 25th. 1992
' Date Completed: Revised February 19, 1992
'
' Purpose: To make four separate reports using BKLARpt.Txt
' as input. Output to BKLARpt(1 to 4).Txt
'
' Note: BKLARPTS.EXE must be executed in the directory
' where BKLARpt.Txt resides. No specific error checking
' is done to make sure that BKLARpt.Txt exists. If it
' doesn't the program will BOMB.
'
' This program is compatable with MS DOS 5.0 QBasic and
' may be compiled using QuickBASIC 4.5. I Linked with
' Crescent Software library P.D.Q. which makes the EXE
' file a LOT SMALLER.
'
' To run BKLARpts.bas from MS DOS 5.0 QBasic and return
' to the DOS system prompt run as follows:
' QBASIC /RUN BKLARPTS
DIM Header$(1 TO 6) 'Make this (1 TO 5) if you have not pre-configured
'BinkLA with your System Name (-SN)
ON ERROR GOTO Drats: 'Global error trap
'Open BKLARpt.Txt - output created by BinkLA
'-------------------------------------------
OPEN "BKLARpt.Txt" FOR INPUT AS #6 'Read access
'Get the BKLARpt.Txt header info
'-------------------------------
FOR X% = 1 TO 6 '1 TO 5 if BinkLA not pre-configured with -SN
LINE INPUT #6, Header$(X%)
NEXT
FOR Rpt% = 1 TO 4 'change to 5 if -MD switch selected in BinkLA
Rpt$ = LTRIM$(STR$(Rpt%))
OPEN "BKLARpt" + Rpt$ + ".Txt" FOR OUTPUT AS Rpt%
'Write Out "BKLARptn.Txt"
'------------------------
FOR X% = 1 TO 5
PRINT #Rpt%, Header$(X%)
NEXT
DO
LINE INPUT #6, ReportBody$
IF LEFT$(ReportBody$, 1) = "" THEN
'do nothing
ELSE
PRINT #Rpt%, ReportBody$
END IF
LOOP UNTIL LEFT$(ReportBody$, 1) = "╘" OR EOF(6)
CLOSE Rpt%
PRINT "BKLARpt" + Rpt$ + ".Txt - Done"
NEXT
CLOSE : SYSTEM
Drats:
BEEP
PRINT "Program bombed!"
SYSTEM